package org.example;

import javax.sql.DataSource;
import java.sql.Connection;

public class JdbcTransactionFactory implements TransactionFactory{
    @Override
    public Transaction getTransaction(Connection connection) {
        return new JdbcTransaction(connection);
    }

    @Override
    public Transaction getTransaction(DataSource dataSource, boolean autoCommit) {
        return new JdbcTransaction(dataSource,autoCommit);
    }
}
